/**
* @author zqp
* @version2017年12月24日 
* @description 
*/
package com.zqp.security.core.social.qq.connet;

import org.springframework.social.oauth2.AbstractOAuth2ServiceProvider;
import org.springframework.social.oauth2.OAuth2Operations;
import org.springframework.social.oauth2.OAuth2Template;

import com.zqp.security.core.social.qq.api.QQ;
import com.zqp.security.core.social.qq.api.QQImpl;

/**
* @author zqp
* @version2017年12月24日 
* @description 
*/
public class QQServiceProvider extends AbstractOAuth2ServiceProvider<QQ> {

	private String appId;
	
	private static final String URL_AUTHRIZE="https://graph.qq.com/oauth2.0/authorize";
	private static final  String URL_ACCESS_TOKEN="https://graph.qq.com/oauth2.0/token";
	
	public QQServiceProvider(String appId,String appSecret) {
		super(new QQAuth2RestTemplate(appId, appSecret, URL_AUTHRIZE, URL_ACCESS_TOKEN));
		this.appId	=appId;
	}

	@Override
	public QQ getApi(String accessToken) {
		
		return new QQImpl(accessToken, appId);
		
	}


}
